package com.example.qxfw.hbqx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.TempInversionyb;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

@Mapper
@DS("service")
public interface TempInversionybMapper extends BaseMapper<TempInversionyb> {

    /**
     *根据预报时间时次类型查询逆温预报
     * @param datechar 预报时间
     * @param timechar 预报时次
     * @param fcsttype 预报类型
     * @return
     */
    @Select("SELECT stationname, datechar, timechar, ntimes, type, tempinversion, fcsttype " +
            "FROM temp_inversionyb " +
            "WHERE datechar = #{datechar} AND timechar = #{timechar} AND fcsttype = #{fcsttype} " +
            "ORDER BY type, ntimes ")
    List<TempInversionyb> selectByDatecharAndTimecharAndFcsttypeOfTempInversionyb(Date datechar, Date timechar, String fcsttype);



}
